package ia04.agent.time;

import jade.core.AID;
import jade.core.Agent;
import java.util.ArrayList;

/* Possible time strings
 * Jour
 * Nuit
 */

public class AgentTime extends Agent {
	
	private String time = "Jour";
	private ArrayList<AID> subscribedAgents;
	
	public AgentTime()
	{
		subscribedAgents = new ArrayList<AID>();
	}
	
	protected void setup() {
		try {
			addBehaviour(new BehavUpdateTime(this));
			addBehaviour(new BehavMessTime());
		}
		catch(Exception ex) {
		}
	}

	public void setTime(String time)
	{
		this.time = time;
	}

	public String getTime()
	{
		return time;
	}
	
	public void addSubscriber(AID newSubscriber)
	{
		subscribedAgents.add(newSubscriber);
	}
	
	public ArrayList<AID> getSubscribedAgents()
	{
		return subscribedAgents;
	}

}
